const LoadingReducer = (
  preState = {
    isLoading: true,
  },
  action
) => {
  const {type,val}=action
  switch (type) {
    case 'change-loading':
      let newState = { ...preState }
      newState.isLoading = val
      return newState
    default:
      return preState
  }
}

export default LoadingReducer
